﻿<Window x:Class="Smith.WPF.HtmlEditor.HyperlinkDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
		xmlns:local="clr-namespace:Smith.WPF.HtmlEditor"
        xmlns:resc="clr-namespace:Smith.WPF.HtmlEditor.Resources"
        WindowStartupLocation="CenterOwner" ResizeMode="NoResize" ShowInTaskbar="False"
        Title="{x:Static resc:UiText.WinTitle_InsertHyperlink}" Height="140" Width="380"
        Icon="/Smith.WPF.HtmlEditor;Component/Resources/Images/hyperlink.png">    
    <Window.Resources>
		<Style TargetType="{x:Type Label}">
			<Setter Property="VerticalContentAlignment" Value="Center" />
		</Style>
		<Style TargetType="{x:Type TextBox}">
			<Setter Property="Margin" Value="4" />
		</Style>
		<Style TargetType="{x:Type Button}">
			<Setter Property="MinWidth" Value="56" />
		</Style>
		<local:StringToBooleanConverter x:Key="StrBoolConverter" />
	</Window.Resources>
	<Grid Background="#FFEFEFEF">
        <DockPanel>
            <Border DockPanel.Dock="Bottom" Padding="8">
                <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
                    <Button x:Name="OkayButton" Margin="8,0"
                            Content="{x:Static resc:UiText.Button_OK}" 
							IsEnabled="{Binding Path=URL, Mode=OneWay, Converter={StaticResource StrBoolConverter}}" />
                    <Button x:Name="CancelButton" Content="{x:Static resc:UiText.Button_Cancel}" />
                </StackPanel>
            </Border>
            <Border Padding="8">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Label Content="{x:Static resc:UiText.Label_URL}" Grid.Row="0" />
                    <Label Content="{x:Static resc:UiText.Label_Text}" Grid.Row="1" />
                    <TextBox Text="{Binding Path=URL, UpdateSourceTrigger=PropertyChanged}" Grid.Column="1" Grid.Row="0" />
                    <TextBox Text="{Binding Path=Text}" Grid.Column="1" Grid.Row="1" />
                </Grid>
            </Border>
        </DockPanel>
    </Grid>
</Window>
